﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Text;

namespace MpSoft.Library.CommonLibrary
{
    public class Tooltip
    {
        public static string FilterTooltip(string value)
        {
            value = value.Replace("”", " ");
            value = value.Replace("'", " ");
            value = value.Replace("`", " ");
            value = value.Replace("``", " ");
            return value;
        }
        public static string GetContent(string srcImage, string widthImage, string heightImage,
            string nameProduct, string priceBan, string productsize, string productmaterial,
            string productDESC)
        {
            string strTemplate = Template.GetTemplate(HttpContext.Current.Server.MapPath("~/Templates/ToolTip.htm"), "File Lỗi");
            string strTmp = strTemplate;
            strTmp = strTmp.Replace("[{srcImage}]", srcImage);
            strTmp = strTmp.Replace("[{widthImage}]", widthImage);
            strTmp = strTmp.Replace("[{heightImage}]", heightImage);
            strTmp = strTmp.Replace("[{nameProduct}]", nameProduct);
            strTmp = strTmp.Replace("[{priceBan}]", priceBan);
            strTmp = strTmp.Replace("[{productsize}]", productsize);
            strTmp = strTmp.Replace("[{productmaterial}]", productmaterial);
            strTmp = strTmp.Replace("[{productDESC}]", productDESC);            
            return strTmp;
        }
    }
}
